package com.freedom.sql.jdbc.netty;

import java.nio.channels.SocketChannel;

import io.netty.channel.socket.nio.NioSocketChannel;

public class MyNioSocketChannel extends NioSocketChannel {

	public MyNioSocketChannel(MyNioServerSocketChannel myNioServerSocketChannel, SocketChannel ch) {
		super(myNioServerSocketChannel, ch);
	}

	// 然后在这里，可以任意定制你的属性字段
	private long threadId;
	private byte[] seed;
	private String charset;
	private int charsetIndex;
	public String getDb() {
		return db;
	}

	public void setDb(String db) {
		this.db = db;
	}

	private String db;// 当前数据库

	public int getCharsetIndex() {
		return charsetIndex;
	}

	public void setCharsetIndex(int charsetIndex) {
		this.charsetIndex = charsetIndex;
	}

	private boolean logined = false;

	public String getCharset() {
		return charset;
	}

	public boolean isLogined() {
		return logined;
	}

	public void setLogined(boolean logined) {
		this.logined = logined;
	}

	public void setCharset(String charset) {
		this.charset = charset;
	}

	public byte[] getSeed() {
		return seed;
	}

	public void setSeed(byte[] seed) {
		this.seed = seed;
	}

	public long getThreadId() {
		return threadId;
	}

	public void setThreadId(long threadId) {
		this.threadId = threadId;
	}
}
